package com.github.binarywang.demo.wx.mp.wxService;

import com.github.binarywang.demo.wx.mp.beans.WxMultiConfigDto;
import com.github.binarywang.demo.wx.mp.service.wxservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author chi  2017-08-29 19:18
 **/
@Service
public class WxMultiConfigWebServiceImpl implements WxMultiConfigWebService {

//    @Value(value = "classpath:programs.json")
//    private Resource resource;

    /**
     * 获得所有的多商户列表,demo使用programs.json获取,实际业务中可使用数据库配置
     *
     * @return
     */
    @Autowired
    wxservice ws;

    public List<WxMultiConfigDto> getAllWxConfig(){
        List<WxMultiConfigDto> wx = ws.selectAll();
        return wx;
    }
}
